iframe html code|| html iframe example || (source code)

HTML Iframes

You can use the height and width attributes to specify the size of the iframe:

iframe html code example javascript/css demo. 


source code
<!DOCTYPE html>
<html>
<body>

<h2>HTML Iframes</h2>
<p>You can use the height and width attributes to specify the size of the iframe:</p>

<iframe src="demo_iframe.htm" height="200" width="300" title="Iframe Example"></iframe>

</body>
</html>

 With CSS, you can also change the size, style and color of the iframe's border:

Custom Iframe Border

With CSS, you can also change the size, style and color of the iframe's border:

source code
<!DOCTYPE html>
<html>
<body>

<h2>Custom Iframe Border</h2>
<p>With CSS, you can also change the size, style and color of the iframe's border:</p>

<iframe src="demo_iframe.htm" style="border:2px solid red;" title="Iframe Example"></iframe>

</body>
</html>

Iframe - Target for a Link


sonu india about

When the target attribute of a link matches the name of an iframe, the link will open in the iframe.

source code
<html>
<body>

<h2>Iframe - Target for a Link</h2>

<iframe height="300px" name="iframe_a" src="demo_iframe.htm" title="Iframe Example" width="100%"></iframe>

<p><a href="https://www.sonuindia.com/p/about-us.html" target="iframe_a">sonu india about</a></p>

<p>When the target attribute of a link matches the name of an iframe, the link will open in the iframe.</p>

</body>
</html>


The HTML <iframe> tag specifies an inline frame The src attribute defines the URL of the page to embed Always include a title attribute (for screen readers) The height and width attributes specifies the size of the iframe Use border:none; to remove the border around the iframe</iframe>. 60 Seconds Count Down Timer

60

Post a Comment

0 Comments